import request from '/@/utils/request';

/**
 * 以下为AdminBackup接口地址
 *
 * @method getList 获取列表
 * @method getParent 获取父级分类
 * @method save 编辑保存
 * @method change 修改
 * @method delete 删除
 */
export function AdminBackupApi() {
	return {
		getList: (params?: object) => { //获取列表
			return request({
				url: 'AdminBackup/index.html',
				method: 'get',
				params,
			});
		},
		backup:(data?: object) => { //备份
			return request({
				url: 'AdminBackup/backup.html',
				method: 'post',
				data,
			});
		},
		optimize:(data?: object) => { //优化
			return request({
				url: 'AdminBackup/optimize.html',
				method: 'post',
				data,
			});
		},
		repair:(data?: object) => { //修复
			return request({
				url: 'AdminBackup/repair.html',
				method: 'post',
				data,
			});
		}
	};
}
